﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
using PersonaLibrary.Data;

namespace PersonaLibrary.PersonaliiReference
{
	partial class Department : IDBEntity
	{
		public override string ToString()
		{
			if (Organization != null)
				return string.Format("{0}: {1}", Organization.Name, Name);

			return string.Format("Новый отдел: {0}", Name);
		}

		[XmlIgnore]
		public string FullName
		{
			get { return ToString(); }
		}
	}
}
